An Efficient Quicksort using Value based Pivot Selection an Bidirectional Partitioning

نویسندگان

  • Runumi Devi
  • Vineeta Khemchandani
چکیده

Quick sort is generally considered to be the best internal sorting algorithm, and is often used as a yardstick by which the efficiency of other sorting algorithms is compared. It is, therefore essential that its performance is studied thoroughly. This includes studying the worst case behaviour of the algorithm, and especially when the algorithm is experimentally evaluated. The worst case running time of quick sort algorithm is O(n2 ). This paper proposes a new variant of quick sort, which reduces the running time of the algorithm to n log(n). Two versions of the quick sort are being studied – the Classical quick sort and the proposed one. A comparison is made in terms of running time which is further established by mathematical analysis. The simulation result shows that proposed algorithm is faster than Classical quick sort in the worst case for sorting the same input data size.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Quicksort with median of medians is considered practical

Quicksort[2, 1, 3] is one of the most efficient and widely used sorting algorithms. The major drawback of quicksort is that worst case time complexity of naive implementations of quicksort is O(n2) with input size n. In order to avoid this worst case behavior, a variant of quicksort, so-called introsort[4] 1 , is often used. There exists another solution to keep the worst case complexity of qui...

متن کامل

Introspective Sorting and Selection Algorithms

Quicksort is the preferred in-place sorting algorithm in many contexts, since its average computing time on uniformly distributed inputs is (N log N) and it is in fact faster than most other sorting algorithms on most inputs. Its drawback is that its worst-case time bound is (N 2). Previous attempts to protect against the worst case by improving the way quicksort chooses pivot elements for part...

متن کامل

Dual pivot Quicksort

In this paper, we analyse the dual pivot Quicksort, a variant of the standard Quicksort algorithm, in which two pivots are used for the partitioning of the array. We are solving recurrences of the expected number of key comparisons and exchanges performed by the algorithm, obtaining the exact and asymptotic total average values contributing to its time complexity. Further, we compute the averag...

متن کامل

Partitioning schemes for quicksort and quickselect

We introduce several modifications of the partitioning schemes used in Hoare’s quicksort and quickselect algorithms, including ternary schemes which identify keys less or greater than the pivot. We give estimates for the numbers of swaps made by each scheme. Our computational experiments indicate that ternary schemes allow quickselect to identify all keys equal to the selected key at little add...

متن کامل

A Cost Optimal Parallel Quicksort on CREW PRAM

In this paper we introduce a cost optimal parallel quicksort algorithm. It sorts an array of n elements in O(log n) time using O( n n log ) processors on a CREW PRAM. That is, the total cost is O(n log n), the same as an average sequential quicksort algorithm. The key feature of the proposed algorithm is that it partitions the array concurrently. This removes the performance bottleneck proposed...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2011